package com.appwoo.txtws.activity;

import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import com.appwoo.txtws.app.AppTabActivity;
import com.appwoo.txtws.bean.AutoSoftInfo;

public class MarketTabActivity extends AppTabActivity
{
  public static AutoSoftInfo staASI;
  private RadioButton rbDownload;
  private RadioButton rbRecom;
  private RadioButton rbType;
  private RadioGroup rg;
  private TabHost tabHost;

  private void initActionBar()
  {
    setBarHomeDrawable(getResources().getDrawable(2130837977));
    setBarTitle(getResources().getString(2131427346));
    setBarBackOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        MarketTabActivity.this.finish();
      }
    });
    setBarHomeOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        MarketTabActivity.this.hideBarHome();
        if (MarketTabActivity.this.rbRecom.isChecked())
          MarketTabActivity.this.rbRecom.setChecked(false);
        while (true)
        {
          MarketTabActivity.this.hideBarHome();
          MarketTabActivity.this.tabHost.setCurrentTabByTag("tab4");
          return;
          if (MarketTabActivity.this.rbType.isChecked())
            MarketTabActivity.this.rbType.setChecked(false);
          else if (MarketTabActivity.this.rbDownload.isChecked())
            MarketTabActivity.this.rbDownload.setChecked(false);
        }
      }
    });
  }

  private void initView()
  {
    this.rbRecom = ((RadioButton)findViewById(2131493271));
    this.rbType = ((RadioButton)findViewById(2131493319));
    this.rbDownload = ((RadioButton)findViewById(2131493320));
    this.tabHost = getTabHost();
    this.tabHost.addTab(this.tabHost.newTabSpec("tab1").setIndicator("").setContent(new Intent(this, RecomAppActivity.class)));
    this.tabHost.addTab(this.tabHost.newTabSpec("tab2").setIndicator("").setContent(new Intent(this, SoftTypeActivity.class)));
    this.tabHost.addTab(this.tabHost.newTabSpec("tab3").setIndicator("").setContent(new Intent(this, RecomedActivity.class)));
    this.tabHost.addTab(this.tabHost.newTabSpec("tab4").setIndicator("").setContent(new Intent(this, AllAppActivity.class)));
    this.rg = ((RadioGroup)findViewById(2131493318));
    this.rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
    {
      public void onCheckedChanged(RadioGroup paramAnonymousRadioGroup, int paramAnonymousInt)
      {
        MarketTabActivity.this.showBarHome();
        switch (paramAnonymousInt)
        {
        default:
          return;
        case 2131493271:
          MarketTabActivity.this.tabHost.setCurrentTabByTag("tab1");
          return;
        case 2131493319:
          MarketTabActivity.this.tabHost.setCurrentTabByTag("tab2");
          return;
        case 2131493320:
        }
        MarketTabActivity.this.tabHost.setCurrentTabByTag("tab3");
      }
    });
    this.rbRecom.setChecked(true);
  }

  protected void backKeyCallBack()
  {
    finish();
  }

  public void onBackPressed()
  {
    finish();
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903161);
    initView();
    initActionBar();
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.activity.MarketTabActivity
 * JD-Core Version:    0.6.2
 */